{% extends "base_community.html" %}

{% block content %}
<h1>Community</h1>

{% if adding %}
  <h2 class="deck">Add a {{ feed_type }} feed:</h2>
{% else %}
  <h2 class="deck">Edit {{ feed }}:</h2>
{% endif %}

<form method="POST" action="" id="add_feed_form" class="wide form-input">
  {% csrf_token %}
  {% for field in form %}
    <p>
      {% if field.errors %}
        <p class="errors">{{ field.errors.as_text }}</p>
      {% endif %}
      {{ field }}
    </p>
  {% endfor %}
  {% if adding %}
    <p class="submit"><input class="cta" type="submit" value="Add Feed"></p>
  {% else %}
    <p class="submit"><input class="cta" type="submit" value="Save"></p>
  {% endif %}
</form>

{% endblock %}
